package com.wisedu.w5autocode.wizards;

import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;

import com.wisedu.w5autocode.entity.EntityTemplate;

public class EntityTemplateLabelProvider extends LabelProvider implements ITableLabelProvider {

	@Override
	public Image getColumnImage(Object element, int columnIndex) {
		return null;
	}

	@Override
	public String getColumnText(Object element, int columnIndex) {
		EntityTemplate et = (EntityTemplate) element;
		switch (columnIndex) {
		case 0:
			return et.getClassType();
		case 1:
			return et.getClassName();
		case 2:
			return String.valueOf(et.getLength());
		case 3:
			return String.valueOf(et.isRequired());
		default:
			return "";
		}
	}

}
